package com.ship.boats.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ship.boats.domain.SpBoatsMmsiChange;
import com.ship.boats.mapper.BoatsMmsiChangeMapper;
import com.ship.boats.service.BoatsMmsiChangeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * <b>BoatsMmsiChangeServiceImpl</b>
 *
 * @description: BoatsMmsiChangeServiceImpl <br>
 * @date: 2024/3/29 15:07 <br>
 * @author: lhm <br>
 * @version: 1.0 <br>
 */

@Service
public class BoatsMmsiChangeServiceImpl extends ServiceImpl<BoatsMmsiChangeMapper, SpBoatsMmsiChange> implements BoatsMmsiChangeService {
    private static final Logger logger = LoggerFactory.getLogger(BoatsMmsiChangeServiceImpl.class);


    @Override
    public void createMmsiChange(String mmsi, String imo, String shipName, Date date) {
        SpBoatsMmsiChange spBoatsMmsiChange = new SpBoatsMmsiChange();
        spBoatsMmsiChange.setImo(imo);
        spBoatsMmsiChange.setShipName(shipName);
        spBoatsMmsiChange.setInitialMmsi(mmsi);
        spBoatsMmsiChange.setChangeDate(date);
        baseMapper.insert(spBoatsMmsiChange);
    }
}
